<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:form>
        <p:dataTable var="item" value="#{problemCreateMB.customerdemandlist}" selection="#{problemCreateMB.currentProblem.customerdemandList}" rowKey="#{item.idcustomerdemand}" paginator="true" rows="5"
                     paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
                     rowsPerPageTemplate="5,10,15"   id="customerdemanddialogTable"  >
            <p:column selectionMode="multiple" style="width:16px;text-align:center"/>
            <p:column headerText="#{bundle.order}#{bundle.id}" sortBy="#{item.idcustomerdemand}" filterBy="#{item.idcustomerdemand}">
                <h:outputText value="#{item.idcustomerdemand}" />
            </p:column>
    <!--                        <p:column headerText="#{bundle.date}" sortBy="#{item.servicedate}" filterBy="#{item.servicedate}">
                <h:outputText value="#{item.servicedate}">
                    <f:convertDateTime pattern="YYYY/MM/dd"  />
                </h:outputText>
            </p:column>-->
    <!--                        <p:column headerText="#{bundle.idcustomer}" sortBy="#{item.idcustomer}" filterBy="#{item.idcustomer}">
                <h:outputText value="#{item.idcustomer}" />
            </p:column>-->
            <p:column headerText="#{bundle.username}" sortBy="#{item.idcustomer.iduser.name}" filterBy="#{item.idcustomer.iduser.name}">
                <h:outputText value="#{item.idcustomer.iduser.name}" />
            </p:column>
            <p:column headerText="#{bundle.tel}" sortBy="#{item.tel}" filterBy="#{item.tel}">
                <h:outputText value="#{item.tel}" />
            </p:column>
            <p:column headerText="#{bundle.address}" sortBy="#{item.address}" filterBy="#{item.address}">
                <h:outputText value="#{item.address}" />
            </p:column>
            <p:column headerText="#{bundle.readyTime}" sortBy="#{item.readyTime}" filterBy="#{item.readyTime}">

                <h:outputText value="#{item.readyTime}">
                    <f:convertDateTime pattern="HH:mm" />
                </h:outputText>
            </p:column>
            <p:column headerText="#{bundle.dueDate}" sortBy="#{item.dueDate}" filterBy="#{item.dueDate}">
                <h:outputText value="#{item.dueDate}">
                    <f:convertDateTime pattern="HH:mm"  />
                </h:outputText>
            </p:column>
            <p:column headerText="#{bundle.serviceTime}" sortBy="#{item.serviceTime}" filterBy="#{item.serviceTime}">
                <h:outputText value="#{item.serviceTime}" />
            </p:column>
        <p:column headerText="#{bundle.demand}" sortBy="#{item.requirement}" filterBy="#{item.requirement}">
            <h:outputText value="#{item.requirement}" />
        </p:column>
        </p:dataTable>
        <p:blockUI block="customerdemanddialogTable" trigger="customerdemanddialogTable">
            LOADING<br />
            <p:graphicImage name="img/ajaxloadingbar.gif"/>
        </p:blockUI>
        <p:separator />
        <h:panelGrid columns="2" class="dialoggrid">
            <p:commandButton update=":growl,:form:customerdemandTable" oncomplete="PF('selectcustomerdemand').hide();" value="#{bundle.conform}"/>

            <p:commandButton  immediate="true" value="#{bundle.back}" onclick="PF('selectcustomerdemand').hide();"/>                        
        </h:panelGrid>
    </h:form>
</ui:composition>

